package urban_seed_sg

import (
	"fmt"
	"gitee.com/theegg/go-brick/app/model/urban/urban_elements"
	"gitee.com/theegg/go-brick/app/service/app"
)

// 景点  seed
func InitPartnerTourElementsSeed() {

	items := make(map[int]urban_elements.UrbanElements)

	items[210001] = urban_elements.UrbanElements{
		Id:          210001,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "鱼尾狮公园",
		TitleEn:   "Merlion Park",
		TypeId:    1,
		TypeSubId: 1004,
		Summary:   "是新加坡面积最小的公园。1972年，前新加坡总理李光耀为鱼尾狮公园剪彩开幕。现公园已迁到浮尔顿1号的新家",
		Content:   "",

		OpenTime:    "07:00",
		CloseTime:   "19:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "微风徐徐,观景胜地,闹中取静",
		FeeTicketHas: false,
		FeeInnerHas:  false,
		FeeAmount:    "",

		Country:    "sg",
		ProvinceId: 4002,
		CityId:     4002,
		Address:    "1 Fullerton Road One Fullerton, Merlion Park, Singapore, 049213, Singapore",

		CoordinateX: "11561123.79",
		CoordinateY: "142316.57",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	count := 0
	errCount := 0
	for _, item := range items {
		_, err := app.Db().Insert(item)
		if err != nil {
			fmt.Println(err.Error())
			errCount++
		} else {
			count++
		}
	}

	fmt.Printf("%5s|%25s|%10d|%8d|\n", "", "urban_elements", count, errCount)
}
